package com.netease.cloud.cm.api;

import com.fasterxml.jackson.databind.JsonNode;
import com.netease.cloud.cm.common.Constants;
import com.netease.cloud.cm.model.response.AdminUserResponse;
import com.netease.cloud.cm.model.response.BasicResponse;
import com.netease.cloud.cm.model.response.ListAdminUserResponse;
import retrofit2.Call;
import retrofit2.http.*;

import java.util.Map;

/**
 * 超级管理员相关接口定义
 */
public interface AdminUserService {
	@Headers({Constants.HEADER_ACCEPT, Constants.HEADER_REQUEST_ID, Constants.HEADER_LANGUAGE_EN})
	@HTTP(method = "POST", path = "ncm?Version=" + Constants.VERSION_1, hasBody = true)
	Call<AdminUserResponse> createService(@QueryMap Map<String, Object> map,
										  @Body JsonNode body);

	@Headers({Constants.HEADER_ACCEPT, Constants.HEADER_REQUEST_ID, Constants.HEADER_LANGUAGE_EN})
	@HTTP(method = "POST", path = "ncm?Version=" + Constants.VERSION_1, hasBody = true)
	Call<AdminUserResponse> updateService(@QueryMap Map<String, Object> map,
										  @Body JsonNode body);

	@Headers({Constants.HEADER_REQUEST_ID, Constants.HEADER_LANGUAGE_EN})
	@HTTP(method = "POST", path = "ncm?Version=" + Constants.VERSION_1, hasBody = true)
	Call<BasicResponse> delService(@QueryMap Map<String, Object> map,
								   @Body JsonNode body);

	@Headers({Constants.HEADER_REQUEST_ID, Constants.HEADER_LANGUAGE_EN})
	@HTTP(method = "GET", path = "ncm?Version=" + Constants.VERSION_1)
	Call<ListAdminUserResponse> listService(@QueryMap Map<String, Object> map);
}
